import request from '@/utils/request'

// 查询项目信息列表
export function listProject(query) {
  return request({
    url: '/workOrder/project/list',
    method: 'get',
    params: query
  })
}

// 查询项目信息详细
export function getProject(id) {
  return request({
    url: '/workOrder/project/' + id,
    method: 'get'
  })
}

// 新增项目信息
export function addProject(data) {
  return request({
    url: '/workOrder/project',
    method: 'post',
    data: data
  })
}

// 修改项目信息
export function updateProject(data) {
  return request({
    url: '/workOrder/project',
    method: 'put',
    data: data
  })
}

// 删除项目信息
export function delProject(id) {
  return request({
    url: '/workOrder/project/' + id,
    method: 'delete'
  })
}

//项目团队列表
export function queryTeamsList() {
  return request({
    url: '/system/user/userList',
    method: 'get'
  })
}

//获取当前登录用户的项目列表
export function queryProjectList() {
  return request({
    url: '/workOrder/project/getProjectList',
    method: 'get'
  })
}

//项目导出
export function projectExport(projectCode) {
  return request({
    url:'/workOrder/project/projectExport/'+projectCode,
    method:'get'
  })
}//项目导出
export function downloadProject(filePath) {
  return request({
    url:'/workOrder/project/download',
    method:'get',
    params: filePath
  })
}
